package com.team8.system.service.controller;

import com.team8.system.pojo.PackageInfo;
import com.team8.system.service.service.PackageInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Controller
@RequestMapping("package_info")
public class PackageInfoController {

    @Autowired
    private PackageInfoService packageInfoService;

    @RequestMapping("package_infos_ffid_packid")
    public ResponseEntity<List<PackageInfo>> getPackageInfos(@RequestParam("ffid") String ffid, @RequestParam("pack_id") String packId){

        List<PackageInfo> packageInfos =  packageInfoService.getgetPackageInfosByFfidAndPackid(ffid, packId);
        return ResponseEntity.ok(packageInfos);
    }

}
